<?php

class ViewController extends BackendController
{
    public function actionIndex()
    {
        $user=User::model()->findByPk(Yii::app()->request->getQuery('id'));
        $image=Yii::app()->theme->baseUrl.'/images/user_';
        $image.=$user->isBoy ? 'boy.gif' : 'girl.gif';

        $this->render('index',array(
            'user'=>$user,
            'image'=>$image,
        ));
    }
}